/**
 * futures : masterlink.futures.dao.BaseDao.java
 */
package masterlink.futures.dao;

import java.io.Serializable;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.orm.hibernate3.HibernateTemplate;

/**
 * TODO Write the description
 *
 * @author : tonyyang
 * Create date : 2011/10/25
 * @version 1.0.0	
 */
public abstract class TimesTenHibernateDao<Bean extends Serializable,ID extends Serializable> extends SpringHibernateDao<Bean,ID>{
	
	protected HibernateTemplate template;
	
	@Autowired(required=true)
	@Qualifier("ttSessionFactory")
	public void setSessionFactory(SessionFactory factory){
		this.template=new HibernateTemplate(factory);
	}
	
	@Override
	protected HibernateTemplate getTemplate() {
		return this.template;
	}
	
}
